package com.lpssfxy.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.lpssfxy.utils.Constant;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.List;

/**
 * 最近评分次数实体类，用于封装从mongo中联合查询得到的结果
 */
@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Document(value = Constant.MONGODB_RATE_MORE_PRODUCTS_RECENTLY_COLLECTION)
public class RecentlyRateMoreProduct {
    @JsonIgnore
    private String _id;
    private Integer productId;      // 商品ID
    private Integer total;          // 商品被评分次数
    private Integer monthOfYear;    // 月份
    private List<Product> products; // 商品信息列表
}
